interface SearchFunc {
    (source: string, subString: string): boolean;
}

let mySearch: SearchFunc;
mySearch = function(a: string, subString: string) {
    return a.search(subString) !== -1;
}
console.log( mySearch('abc','a'));
